/** 全局样式 */
// 如果需要覆盖更多样式变量请查看文档
$--ele-font-path: "~ele-admin/packages/style/fonts";
// 如果不需要切换主题使用这个
//@import "~ele-admin/packages/style/themes/default.scss";
// 如果不需要切换主题固定为夜间主题使用这个
//@import "~ele-admin/packages/style/themes/dark.scss";
// 需要在线切换主题使用这个
@import "~ele-admin/packages/style/themes/dynamic.scss";

.textarea60px {
  width: 100%;

  textarea {
    min-height: 60px !important;
  }
}

.textarea100px {
  width: 100%;

  textarea {
    min-height: 100px !important;
  }
}

.red {
  color: red !important;
}

.change-button {
  cursor: pointer;
  padding: 2px !important;
}

.change-icon {
  color: red;
  cursor: pointer;
}

.min1200px .el-dialog {
  min-width: 1200px;
}

.ele-form-search {
  .el-input-group__append, .el-input-group__prepend {
    padding: 0 10px !important;
  }

  .el-form-item {
    margin: 5px 10px 5px 0 !important;
  }

  .el-form-item__label {
    padding: 0 !important;
  }
}

// 去除表格最后有一条线
.el-table__fixed-right::before {
  height: 0 !important;
}

.is-error {
  .el-upload {
    border: 1px dashed #f00 !important;
  }

  .avatar-uploader-icon {
    color: #f00 !important;
  }
}

.tips {
  display: inline-block;
  margin-left: 20px;
  height: 30px;
  vertical-align: top;
  color: #999
}

// 下拉框
.vue-treeselect {
  display: inline-block;
}

// 弹出框里的搜索
.el-dialog:not(.ele-dialog-form) .el-dialog__body .el-form .el-form-item:last-child, .el-popover .el-form-item {
  margin-bottom: 0 !important;
}

.ele-dialog-form .el-dialog__body {
  padding-top: 20px;
  padding-right: 30px;
}

// 表格上搜索
.ele-table-tool .ele-table-tool-title {
  flex: 1;
}

// 表单
.form-mb0 > .el-form-item {
  margin-bottom: 0;
}

/* 异常页面 */
.ele-exception {
  margin: 145px 0;

  .ele-exception-img,
  .ele-exception-content {
    margin: 15px 30px;
    display: inline-block;
    vertical-align: middle;

    img {
      filter: $--content-image-filter;
    }
  }

  .ele-exception-content > h1 {
    font-size: 72px;
    font-weight: 600;
    margin: 0 0 20px 0;
  }

  .ele-exception-content > p {
    font-size: 20px;
    margin: 0 0 25px 0;
  }
}

@media screen and (max-width: 768px) {
  .ele-exception {
    margin: 40px 0;

    .ele-exception-img {
      margin: 0;

      img {
        max-height: 200px;
        max-width: 100%;
      }
    }

    .ele-exception-content {
      text-align: center;
    }
  }
}

[ele-resizable].el-dialog__wrapper > .el-dialog > .el-dialog__header {
  flex-shrink: 0;
}

.cursor-pointer {
  cursor: pointer;
}

.none {
  display: none !important;
}

.pd2 {
  padding: 2px;
}

.oh {
  overflow: hidden;
}

.fl {
  float: left;
}

.fr {
  float: right;
}

.flex {
  display: flex;

  .flex-1 {
    flex: 1
  }
}

.fs-normal {
  font-style: normal;
}

$width: 50 60 70 80 90 100 120 140 160 170 300;
@each $i in $width {
  .width#{$i}px {
    width: #{$i}px !important;
  }
}

$formItemWidth: 250 350;
@each $i in $formItemWidth {
  .formItemWidth#{$i} .el-form-item__content {
    max-width: #{$i}px !important;
  }
}

.formItemWidth100p {
  width: 100%;

  .el-form-item__content {
    width: 100%;
    max-width: 100% !important
  }
}

// 搜索框内的日期范围选择器
.search-date-editor {
  width: 220px !important;

  .el-range-input {
    width: 80px !important;
  }
}

.search-date-editor-time {
  width: 300px !important;

  .el-range-input {
    width: 120px !important;
  }
}

//form label el-link 等文字大小
.el-form-item--mini .el-form-item__label,
.layout-col-box .el-col,
.link-word-font, .el-table--mini .el-link, .el-descriptions__body .el-link,
.el-form-item--mini .el-radio__label, .main-font-size,
.el-select-dropdown__item, .el-checkbox__label {
  font-size: 12px;
}

.ele-text-center {
  .el-input__inner {
    text-align: center;
  }
}

// 详情
.info-box {
  .el-col {
    line-height: 22px;
  }

  .info-loading {
    padding: 20px 0 30px
  }

  .info-line:not(:first-child) {
    margin-top: 5px;
  }
}

.info-table {
  tr th {
    height: 32px;
    padding: 0;
  }
}

.line-background {
  tr.el-table__row, tr.el-table__row:hover > td {
    background: #d9d9d9 !important;
  }
}

// tree-select 组件行高
.vue-treeselect__control {
  height: 28px !important;
}

.vue-treeselect__placeholder, .vue-treeselect__single-value {
  line-height: 28px !important;
}


.title-justify {
  text-align-last: justify;
  text-align: justify;
  text-justify: distribute-all-lines;
  margin-right: 3px;
}

// 上传
.avatar-uploader {
  .preview img {
    max-width: 200px;
  }

  .el-upload {
    border: 1px dashed #d9d9d9;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
  }

  .avatar-uploader-icon {
    font-size: 28px;
    color: #8c939d;
    width: 130px;
    height: 130px;
    line-height: 130px;
    text-align: center;
  }
}


// 仓库层级
.cell-container-select {
  //width: calc(100% - 20px);
  height: 100%;
  margin-left: 20px;
}

.warehouse-level {
  .level-item {
    font-size: 14px;
    position: relative;
    padding-left: 60px;

    .level-item-top {
      position: absolute;
      left: 0;
      top: 10px;
    }
  }

  .level-number {
    width: 30px;
    display: inline-block;
  }

  .level-checkbox {
    display: inline-block;

    i {
      font-size: 16px;
      cursor: pointer;
    }

    .el-checkbox__label {
      display: none;
    }
  }

  .level-border {
    display: flex;
    padding: 5px;
  }

  .level-border, .level-line {
    border: 1px solid #eee;
    align-items: center;
  }

  .level-line {
    margin-top: 8px;
    display: inline-flex;
    padding-bottom: 5px;
    max-width: 100%;
    flex-wrap: wrap;
    height: auto;
  }

  .level-box {
    height: 20px;
    width: 27px;
    margin: 5px 5px 0;
    cursor: pointer;
    justify-content: center;

    &:hover {
      background: #fafafa;
    }
  }

  .level-cell {
    height: 10px;
    width: 10px;
    font-size: 14px;
    justify-content: center;
  }

}

// 选择仓库
.warehouse-select {
  width: 100%;
  height: 100%;
  max-height: calc(100% - 30px);
  margin: 15px 0 0 15px !important;
}

.warehouse-select, .warehouse-select-page {
  display: flex;
  flex-direction: column;

  .el-card {
    margin-bottom: 0 !important;

    .el-card__body {
      box-sizing: border-box;
      height: calc(100vh - 222px);
      overflow: scroll;
    }
  }

  .el-card__header {
    padding: 8px 15px;
    font-size: 13px;
    font-weight: bold;
  }

  .ele-pro-table {
    height: 100%;
  }

  .box-card-three, .box-card-two {
    margin-left: 20px;
  }

  .box-card-two {
    .el-card__body {
      padding: 15px 0 0 !important;
    }
  }

  .el-dialog__header {
    flex: 0 0 auto;
  }

  .el-dialog__body {
    flex: 1 0 auto;
  }

  .el-row, .el-col, .el-card {
    height: 100%;
  }
}

.warehousing {
  .cell-box.cell-box-title {
    margin-top: 20px;
    height: 32px;
    overflow: hidden;

    .cell-item {
      border-bottom: none;
      font-weight: bold;
    }
  }

  .cell-box {
    margin-top: 20px;
    overflow: hidden;
    display: flex;
    flex-wrap: wrap;
    border-top: 1px solid var(--border-color-lighter);
    border-left: 1px solid var(--border-color-lighter);

    .cell-item {
      width: 283px;
      padding: 6px 5px 6px 15px;
      border-right: 1px solid var(--border-color-lighter);
      border-bottom: 1px solid var(--border-color-lighter);
      height: 40px;
      line-height: 29px;

      span {
        display: inline-block;
      }

      span.cell-id {
        width: 85px;
      }

      span.cell-is-box {
        width: 45px;
        padding-left: 15px;
      }

      span.cell-num {
        width: 80px;
      }

      span.cell-delete {
        width: 30px;
        text-align: center;
      }
    }
  }
}

.input-popover {
  display: inline-block;

  .el-select .el-input__inner {
    border-radius: 4px 0 0 4px;
    border-right: none;
  }

  .input-popover-button {
    border-radius: 0 4px 4px 0;
  }

}


.word-not-select {
  user-select: none;
}
